from langchain.chains.llm import LLMChain
from langchain.prompts import PromptTemplate
from langchain_community.llms import QianfanLLMEndpoint

prompt_template = "给我一个很土但是听起来好养活的男孩小名"

llm = QianfanLLMEndpoint(
    qianfan_ak='ae7eoePCWBS8nBTQv7vbmyxm',
    qianfan_sk='tvxwV0Emkp9sxuU3neDfF77Drhl7TWUa'
)
llm_chain = LLMChain(
    llm = llm,
    prompt=PromptTemplate.from_template(prompt_template)
)

print(llm_chain.predict())